package com.fjxd.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fjxd.feign.pojo.Ticket;
import com.fjxd.order.pojo.Order;
import com.fjxd.order.pojo.OrderManyPeople;
import com.fjxd.order.pojo.vo.CreateOrderVo;
import com.fjxd.order.pojo.vo.OrderVo;
import com.fjxd.order.pojo.vo.TicketVo;

import java.util.List;

/**
 * @author csw
 */
public interface OrderService extends IService<Order> {
    /**
     * 通过订单id查询订单
     * @param id 订单id
     * @return 返回一个订单对象
     */
    List<Order> getOrderById(Integer id);

    /**
     * 创建一个order订单
     *
     * @param order order对象
     * @return 返回影响的行数
     */

    Integer deUserMoney(Order order, boolean pay);

    /**
     * 修改order订单
     *
     * @param order order对象
     */
    Integer updateOrder(Order order);

    List<Order> getOrderByUserId(Integer id);

    boolean delOrderById(Integer id);

    boolean updateOrderStatusById(Integer id,Integer status);

    List<OrderVo> getOrderManyPeople(Integer orderId);

    List<TicketVo> getOrderManyTicket(Integer orderId);

    Integer createOrder(CreateOrderVo createOrderVo);

    boolean retreatTicket(List<Integer> storeId, Integer count);
}
